package com.cxx.home.dto.journal;

import com.cxx.common.PlainView;
import com.cxx.common.ReadView;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
@JsonView(PlainView.class)
public class JournalDto {
    @Schema(description = "id")
    @JsonView(ReadView.class)
    private Long id;

    @Schema(description = "日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date date;

    @Schema(description = "地点")
    private String location;

    @Schema(description = "类别")
    private String category;

    @Schema(description = "天气")
    private String weather;

    @Schema(description = "心情")
    private String mood;

    @Schema(description = "内容")
    @NotBlank(message = "内容不能为空")
    private String content;

    @Schema(description = "图片地址")
    private String imageUrl;

    @Schema(description = "视频地址")
    private String videoUrl;
}
